<?php

namespace app\model\scope;

trait ScopeTitle
{
    public function scopeTitle($query, $title=1)
    {
        return $query->whereLike('title', '%'.$title.'%');
    }
}